/**
 * Created by hcadmin on 16/5/23.
 */
define([
    "jquery",
    "IO",
    "UPLOADUI",
    "UPLOAD",
    "jqueryUI",
    "bootbox"
], function ($, IO, upui, up, jui, bootbox, definebt) {
    $(function () {
        $(".btnAgree").click(function(){
            var baby_sister_appointment_id=$("#baby_sister_appointment_id").val();
            var params={
                status:1,
                baby_sister_appointment_id:baby_sister_appointment_id
            };
            //alert(baby_sister_appointment_id)
            IO.get('/api/baby_sister_appointment_put',params,function(d){
                if(d.code==0){
                    bootbox.alert('接单成功');
                }
                else{
                    bootbox.alert('接单失败');
                }
            });
        });

        $(".btnNoAgree").click(function(){
            var baby_sister_appointment_id=$("#baby_sister_appointment_id").val();
            var params={
                status:-1,
                baby_sister_appointment_id:baby_sister_appointment_id
            };
            IO.get('/api/baby_sister_appointment_put',params,function(d){
                if(d.code==0){
                    bootbox.alert('拒单成功');
                }
                else{
                    bootbox.alert('拒单失败');
                }
            });
        })
    })
})